<template>
  <span class="switch" :class="{ switch__enable: props.enable }">
    <slot />
  </span>
</template>

<!--组件自定义-开关状态-->
<script setup lang="ts">

const props = defineProps<{ enable: boolean }>()

</script>

<style scoped lang="less">
.switch::before {
  content: '';
  padding: 4px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 4px;
  background-color: #697088;
}

.switch__enable::before {
  background-color: #50e600;
}
</style>
